package TemplateMethodDomo.example;

/**
 * @author zsh
 * @Description
 * @create 2022-05-09 20:28
 */
public class CharDisplay extends AbstractDisplay {
    private char ch; //需要显示的字符

    public CharDisplay(char ch){
        this.ch = ch;
    }

    @Override
    public void open() {
        System.out.println("<<<");
    }

    @Override
    public void print() {
        System.out.println(this.ch);
    }

    @Override
    public void close() {
        System.out.println(">>>");
    }
}
